package se19team1e.dao.abstrakt.jaas;

import java.util.List;

import se19team1e.dao.abstrakt.generics.DataAccessObject;
import se19team1e.entity.CompanyDTO;
import se19team1e.exception.DataAccessException;

/**
 * An abstract DAO interface to manipulate the company objects in the
 * persistence storage.
 * 
 * <p>
 * This interface is referenced by controllers, such that the underlying
 * persistence mechanism can be swapped out easily in the future.
 * </p>
 * 
 * @author Nasri Bin Najib
 * 
 */
public interface CompanyDAO extends DataAccessObject<CompanyDTO> {

	/**
	 * Retrieve all companies in the system.
	 * 
	 * @return list of all companies in the system.
	 */

	@Override
	public List<CompanyDTO> retrieveAll() throws DataAccessException;

	/**
	 * Create the Company DAO using interface DataAccessObject
	 * 
	 * @param CompanyDTO
	 *            The Company dto
	 * @throws DataAccessException
	 */
	@Override
	public boolean create(CompanyDTO dtoType) throws DataAccessException;

	/**
	 * Deletes an existing Company object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Company object to be deleted
	 * @return success state
	 * @throws DataAccessException
	 */
	@Override
	public boolean delete(Object idType) throws DataAccessException;

	/**
	 * Gets an existing Company object from the persistence storage by the given
	 * id.
	 * 
	 * @param idType
	 *            ID of the Company object
	 * @return Object Company object specified by the ID
	 * @throws DataAccessException
	 */
	@Override
	public CompanyDTO retrieveById(Object idType) throws DataAccessException;

	/**
	 * Updates the delta of an existing Company object to the persistence
	 * storage.
	 * 
	 * @param CompanyDTO
	 *            dto type is Company
	 * @return Object updated Company DTO
	 * @throws DataAccessException
	 */
	@Override
	public CompanyDTO update(CompanyDTO dtoType) throws DataAccessException;

}
